public abstract class BinaryMathOperator implements MathOperator {

	@Override
	public void execute(CalculatorStack stack) {
		double rhs = stack.pop();
		double lhs = stack.pop();
		stack.push(doMathOperator(lhs, rhs));
	}
	
	protected abstract double doMathOperator(double lhs, double rhs);

}